More graceful failure if libusb-config not found and/or an unsuitably old
authorrobertl <robertl>
Mon, 3 Jul 2006 02:19:33 +0000 (02:19 +0000)
committerrobertl <robertl>
Mon, 3 Jul 2006 02:19:33 +0000 (02:19 +0000)
libusb is found - just configure libusb away; don't error out.

configure.in

index 594a80593f6e5b20216b623011ca5f6b21213a6e..029aff45864acce65bec840ea0e2e81bf818ca0d 100644 (file)
@@ -96,9 +96,7 @@ case "$target" in
                OSJEEPS=jeeps/gpsusbstub.o
        else
                AC_CHECK_PROG(LIBUSBCONFIG, libusb-config, true, false)
-               if test "$LIBUSBCONFIG" = false; then
-                       AC_MSG_ERROR([libusb-config not found in $PATH])
-               fi;
+           if test "$LIBUSBCONFIG" = true; then
                OLDFLAGS=$LDFLAGS
                OCFLAGS=$CFLAGS
                LDFLAGS="$LDFLAGS `libusb-config --libs`"
@@ -107,8 +105,8 @@ case "$target" in
                AC_CHECK_LIB([usb], [usb_interrupt_read],
                        AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])
                        [USB_CFLAGS="`libusb-config --cflags`"]
-                       [USB_LIBS="`libusb-config --libs`"],
-                       [AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
+                       [USB_LIBS="`libusb-config --libs`"]
+#                      ,[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
                        )
                # Override libusb for Darwin to reduce external 
                # runtime requirement.
@@ -123,6 +121,7 @@ case "$target" in
                OSJEEPS=jeeps/gpslibusb.o
                CFLAGS="$OCFLAGS"
        #       LIBS="$LIBS `libusb-config --libs`"
+           fi
        fi
        ;;
 esac